package com.efast.dmom.equipment.controller.homepage;

import com.efast.dmom.equipment.api.EquipHomePageControllerApi;
import com.efast.dmom.equipment.api.EquipHotPointRecordControllerApi;
import com.efast.dmom.equipment.bean.EquipHomePageBean;
import com.efast.dmom.equipment.entity.EquipHotPointRecord;
import com.efast.dmom.equipment.service.masterdata.EquipReportService;
import com.efast.dmom.equipment.service.masterdata.IEquipHotPointRecordRService;
import com.efast.dmom.equipment.service.masterdata.IEquipMasterDataReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * 
 * zch
 */
@Controller
@RequestMapping("/equipment")
public class EquipHotPointRecordController implements EquipHotPointRecordControllerApi {
	@Autowired
    private IEquipHotPointRecordRService equipHotPointRecordRService;

	@Override
	@RequestMapping(value = "/saveEquipHotPointRecord", method = RequestMethod.POST)
	public @ResponseBody void saveEquipHotPointRecord(@RequestBody EquipHotPointRecord bean) {
		equipHotPointRecordRService.saveEquipHotPointRecord(bean);
	}


	@Override
	@RequestMapping(value = "/queryEquipHotPointRecord/{hotKey}", method = RequestMethod.POST)
	public @ResponseBody EquipHotPointRecord queryEquipHotPointRecord(@PathVariable String hotKey) {
		EquipHotPointRecord bean=new EquipHotPointRecord();
		bean.setHotKey(hotKey);
		return equipHotPointRecordRService.updateEquipHotPointRecord(bean);
	}

	@Override
	@RequestMapping(value = "/deleteEquipHotPointRecord", method = RequestMethod.POST)
	public @ResponseBody void deleteEquipHotPointRecord(@RequestBody EquipHotPointRecord bean) {
		equipHotPointRecordRService.deleteEquipHotPointRecord(bean);
	}
}
